#ifndef _TIM_H
#define _TIM_H

#include "system.h"

#define left_servo    TIM_CHANNEL_1
#define right_servo  TIM_CHANNEL_2
#define folder_servo  TIM_CHANNEL_3
#define lift_servo    TIM_CHANNEL_4

extern TIM_HandleTypeDef htim2, htim4;


#define BUZZER_OPEN        TIM3->CCR2=500
#define BUZZER_CLOSE       TIM3->CCR2=0

extern TIM_HandleTypeDef TIM3_Handler;

void tim_set_pwm_buzzer(u32 compare);

void timer_folder_pwm_set(u16 p);

void timer_init(void);


#endif
